const app = getApp()
import http from '../../utils/request.js'
import api from '../../utils/api.js'
let util = require("../../utils/util.js")
Component({

  properties: {
    yearMonth: String
  },
  data: {

  },
  methods: {

  },
  lifetimes: {
    attached: function () {
      let date = new Date(this.data.yearMonth);
      let title = date.getFullYear() + '年' + (date.getMonth() + 1) + '月 月报'
      this.setData({title: title})
      http.get(api.monthReport)
        .then(result => {
          let data = result.data.data;
          if (data.pages === page) {
            this.setData(data)
          }
        })
    },
    moved: function () { },
    detached: function () { },
  },
})
